home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing;
-
- import com.sun.java.accessibility.Accessible;
- import com.sun.java.accessibility.AccessibleComponent;
- import com.sun.java.accessibility.AccessibleContext;
- import com.sun.java.accessibility.AccessibleRole;
- import com.sun.java.accessibility.AccessibleState;
- import com.sun.java.accessibility.AccessibleStateSet;
- import com.sun.java.swing.border.Border;
- import com.sun.java.swing.border.TitledBorder;
- import java.awt.Color;
- import java.awt.Container;
- import java.awt.Cursor;
- import java.awt.Dimension;
- import java.awt.Font;
- import java.awt.FontMetrics;
- import java.awt.Point;
- import java.awt.Rectangle;
- import java.awt.event.FocusListener;
- import java.awt.event.MouseEvent;
- import java.io.Serializable;
- import java.util.Locale;
-
- public abstract class JComponent$AccessibleJComponent extends AccessibleContext implements Serializable, AccessibleComponent {
- // $FF: synthetic field
- JComponent this$0;
-
- public String getAccessibleName() {
- if (super.accessibleName != null) {
- return super.accessibleName;
- } else {
- Border border = this.this$0.getBorder();
- return border != null && border instanceof TitledBorder ? ((TitledBorder)border).getTitle() : null;
- }
- }
-
- public String getAccessibleDescription() {
- if (super.accessibleDescription != null) {
- return super.accessibleDescription;
- } else {
- try {
- String ttt = this.this$0.getToolTipText((MouseEvent)null);
- if (ttt != null) {
- return ttt;
- }
- } catch (Exception var2) {
- }
-
- return null;
- }
- }
-
- public AccessibleRole getAccessibleRole() {
- return AccessibleRole.SWING_COMPONENT;
- }
-
- public AccessibleStateSet getAccessibleStateSet() {
- return SwingUtilities.getAccessibleStateSet(this.this$0);
- }
-
- public Accessible getAccessibleParent() {
- if (super.accessibleParent != null) {
- return super.accessibleParent;
- } else {
- Container parent = this.this$0.getParent();
- return parent instanceof Accessible ? (Accessible)parent : null;
- }
- }
-
- public int getAccessibleIndexInParent() {
- return SwingUtilities.getAccessibleIndexInParent(this.this$0);
- }
-
- public int getAccessibleChildrenCount() {
- return SwingUtilities.getAccessibleChildrenCount(this.this$0);
- }
-
- public Accessible getAccessibleChild(int i) {
- return SwingUtilities.getAccessibleChild(this.this$0, i);
- }
-
- public Locale getLocale() {
- return this.this$0.getLocale();
- }
-
- public AccessibleComponent getAccessibleComponent() {
- return this;
- }
-
- public Color getBackground() {
- return this.this$0.getBackground();
- }
-
- public void setBackground(Color c) {
- this.this$0.setBackground(c);
- }
-
- public Color getForeground() {
- return this.this$0.getForeground();
- }
-
- public void setForeground(Color c) {
- this.this$0.setForeground(c);
- }
-
- public Cursor getCursor() {
- return this.this$0.getCursor();
- }
-
- public void setCursor(Cursor cursor) {
- this.this$0.setCursor(cursor);
- }
-
- public Font getFont() {
- return this.this$0.getFont();
- }
-
- public void setFont(Font f) {
- this.this$0.setFont(f);
- }
-
- public FontMetrics getFontMetrics(Font f) {
- return this.this$0.getFontMetrics(f);
- }
-
- public boolean isEnabled() {
- return this.this$0.isEnabled();
- }
-
- public void setEnabled(boolean b) {
- boolean old = this.this$0.isEnabled();
- this.this$0.setEnabled(b);
- if (b != old && this.this$0.accessibleContext != null) {
- if (b) {
- this.this$0.accessibleContext.firePropertyChange("AccessibleState", (Object)null, AccessibleState.ENABLED);
- } else {
- this.this$0.accessibleContext.firePropertyChange("AccessibleState", AccessibleState.ENABLED, (Object)null);
- }
- }
-
- }
-
- public boolean isVisible() {
- return this.this$0.isVisible();
- }
-
- public void setVisible(boolean b) {
- boolean old = this.this$0.isVisible();
- this.this$0.setVisible(b);
- if (b != old && this.this$0.accessibleContext != null) {
- if (b) {
- this.this$0.accessibleContext.firePropertyChange("AccessibleState", (Object)null, AccessibleState.VISIBLE);
- } else {
- this.this$0.accessibleContext.firePropertyChange("AccessibleState", AccessibleState.VISIBLE, (Object)null);
- }
- }
-
- }
-
- public boolean isShowing() {
- return this.this$0.isShowing();
- }
-
- public boolean contains(Point p) {
- return this.this$0.contains(p);
- }
-
- public Point getLocationOnScreen() {
- return this.this$0.isShowing() ? this.this$0.getLocationOnScreen() : null;
- }
-
- public Point getLocation() {
- return this.this$0.getLocation();
- }
-
- public void setLocation(Point p) {
- this.this$0.setLocation(p);
- }
-
- public Rectangle getBounds() {
- return this.this$0.getBounds();
- }
-
- public void setBounds(Rectangle r) {
- this.this$0.setBounds(r);
- }
-
- public Dimension getSize() {
- return this.this$0.getSize();
- }
-
- public void setSize(Dimension d) {
- this.this$0.setSize(d);
- }
-
- public Accessible getAccessibleAt(Point p) {
- return SwingUtilities.getAccessibleAt(this.this$0, p);
- }
-
- public boolean isFocusTraversable() {
- return this.this$0.isFocusTraversable();
- }
-
- public void requestFocus() {
- this.this$0.requestFocus();
- }
-
- public void addFocusListener(FocusListener l) {
- this.this$0.addFocusListener(l);
- }
-
- public void removeFocusListener(FocusListener l) {
- this.this$0.removeFocusListener(l);
- }
-
- // $FF: synthetic method
- public JComponent$AccessibleJComponent(JComponent this$0) {
- this.this$0 = this$0;
- }
- }
-